package com.yxh.lib_base.ext

import android.annotation.SuppressLint
import java.text.SimpleDateFormat
import java.util.*

const val year_month_day = "yyyy-MM-dd"
const val year_month_day_time = "yyyy-MM-dd HH:mm:ss"
const val minutes_and_seconds = "HH:mm:ss"

@SuppressLint("SimpleDateFormat")
fun Date.format(format: String = year_month_day): String = SimpleDateFormat(format).format(this)
